/****************************************************************************
**
** Copyright (C) 2009-2010 Mist Poryvaev.
** All rights reserved.
** Contact: Mist Poryvaev (mist.poryvaev@gmail.com)
**
** This file is part of the RailWorm project.
**
****************************************************************************/

#ifndef SETUPLOGON_H
#define SETUPLOGON_H

#include <QDialog>

namespace Ui {
    class SetupLogon;
}

class SetupLogon : public QDialog {
    Q_OBJECT
public:
    ~SetupLogon();
    static SetupLogon * i();

    QString Login();
    QString Password();
    bool IsValid();

protected:
    void showEvent(QShowEvent * se);

private:
    SetupLogon(QWidget *parent = 0);
    static SetupLogon * g_Instance;
    Ui::SetupLogon *ui;
    void Fill();

private slots:
    void on_buttonBox_accepted();
    void on_ShowPassword_toggled(bool checked);
    void on_RegLink_clicked();
};

#endif // SETUPLOGON_H
